package cn.copera.dyy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.copera.dyy.common.service.BaseService;
import cn.copera.dyy.dao.VersionDao;
import cn.copera.dyy.entity.Version;
/**
 * 日志service
 * @author Administrator
 *
 */
@Service
@Transactional(readOnly = true)
public class VersionService extends BaseService {
	
	@Autowired
	private VersionDao versionDao;

	@Transactional(readOnly = false)
	public void save(Version version) {
		versionDao.clear();
		versionDao.save(version);
	}
	public Version findVersion(){
		return versionDao.findExistEntity(new Version(), "");
	}
    
}
